from numpy import array
import matplotlib.pyplot as plt

X = array([-0.1000, -0.0838, -0.0676, -0.0514, -0.0351, -0.0189, -0.0027, 0.0135, 0.0297, 0.0459, 0.0622, 0.0784, 0.0946, 0.1108, 0.1270, 0.1432, 0.1595, 0.1757, 0.1919, 0.2081, 0.2243, 0.2405, 0.2568, 0.2730, 0.2892, 0.3054, 0.3216, 0.3378, 0.3541, 0.3703, 0.3865, 0.4027, 0.4189, 0.4351, 0.4514, 0.4676, 0.4838, 0.5000, 0.5162, 0.5324, 0.5486, 0.5649, 0.5811, 0.5973, 0.6135, 0.6297, 0.6459, 0.6622, 0.6784, 0.6946, 0.7108, 0.7270, 0.7432, 0.7595, 0.7757, 0.7919, 0.8081, 0.8243, 0.8405, 0.8568, 0.8730, 0.8892, 0.9054, 0.9216, 0.9378, 0.9541, 0.9703, 0.9865, 1.0027, 1.0189, 1.0351, 1.0514, 1.0676, 1.0838, 1.1000])

Yhigh = array([5.5216, 5.6018, 5.4390, 5.0694, 4.5349, 3.8806, 3.1526, 2.3950, 1.6482, 0.9472, 0.3202, -0.2122, -0.6371, -0.9493, -1.1508, -1.2496, -1.2584, -1.1937, -1.0741, -0.9184, -0.7451, -0.5704, -0.4078, -0.2673, -0.1551, -0.0736, -0.0215, 0.0052, 0.0130, 0.0095, 0.0027, 0.0001, 0.0077, 0.0290, 0.0651, 0.1140, 0.1707, 0.2273, 0.2741, 0.2996, 0.2924, 0.2414, 0.1376, -0.0253, -0.2493, -0.5322, -0.8660, -1.2378, -1.6291, -2.0171, -2.3749, -2.6735, -2.8828, -2.9739, -2.9205, -2.7015, -2.3023, -1.7167, -0.9482, -0.0110, 1.0699, 2.2584, 3.5086, 4.7658, 5.9689, 7.0525, 7.9503, 8.5980, 8.9371, 8.9179, 8.5033, 7.6716, 6.4186, 4.7596, 2.7304])

Ylow = array([1.7608, 1.9630, 2.0438, 2.0212, 1.9161, 1.7511, 1.5493, 1.3326, 1.1214, 0.9331, 0.7817, 0.6777, 0.6274, 0.6334, 0.6949, 0.8077, 0.9654, 1.1599, 1.3819, 1.6219, 1.8707, 2.1202, 2.3637, 2.5961, 2.8143, 3.0173, 3.2055, 3.3810, 3.5470, 3.7074, 3.8662, 4.0271, 4.1930, 4.3659, 4.5461, 4.7327, 4.9232, 5.1137, 5.2992, 5.4741, 5.6327, 5.7694, 5.8796, 5.9603, 6.0105, 6.0312, 6.0265, 6.0027, 5.9692, 5.9374, 5.9207, 5.9335, 5.9910, 6.1077, 6.2965, 6.5681, 6.9299, 7.3849, 7.9313, 8.5621, 9.2647, 10.0211, 10.8083, 11.5991, 12.3628, 13.0668, 13.6779, 14.1639, 14.4956, 14.6481, 14.6030, 14.3493, 13.8850, 13.2176, 12.3652])

YvcmAdd = array([1.0221, 1.1486, 1.1537, 1.0553, 0.8745, 0.6338, 0.3562, 0.0639, -0.2231, -0.4871, -0.7142, -0.8939, -1.0200, -1.0897, -1.1040, -1.0669, -0.9849, -0.8661, -0.7198, -0.5556, -0.3825, -0.2087, -0.0409, 0.1157, 0.2583, 0.3855, 0.4979, 0.5977, 0.6881, 0.7727, 0.8558, 0.9409, 1.0311, 1.1283, 1.2328, 1.3437, 1.4584, 1.5732, 1.6830, 1.7822, 1.8650, 1.9260, 1.9605, 1.9655, 1.9399, 1.8849, 1.8044, 1.7050, 1.5958, 1.4882, 1.3957, 1.3329, 1.3147, 1.3556, 1.4687, 1.6646, 1.9507, 2.3299, 2.8006, 3.3556, 3.9825, 4.6632, 5.3747, 6.0898, 6.7778, 7.4060, 7.9414, 8.3517, 8.6076, 8.6844, 8.5636, 8.2342, 7.6941, 6.9511, 6.0229])

YvcmMult = array([-9.3590, -9.9425, -9.8399, -9.2248, -8.2653, -7.1153, -5.9072, -4.7474, -3.7142, -2.8568, -2.1977, -1.7356, -1.4497, -1.3050, -1.2576, -1.2595, -1.2638, -1.2279, -1.1169, -0.9048, -0.5752, -0.1211, 0.4568, 1.1518, 1.9533, 2.8496, 3.8299, 4.8862, 6.0143, 7.2145, 8.4916, 9.8532, 11.3091, 12.8683, 14.5378, 16.3196, 18.2091, 20.1941, 22.2536, 24.3589, 26.4747, 28.5617, 30.5796, 32.4919, 34.2700, 35.8985, 37.3791, 38.7350, 40.0133, 41.2867, 42.6526, 44.2311, 46.1598, 48.5876, 51.6663, 55.5400, 60.3343, 66.1445, 73.0244, 80.9759, 89.9404, 99.7928, 110.3387, 121.3158, 132.3989, 143.2099, 153.3317, 162.3264, 169.7570, 175.2113, 178.3281, 178.8229, 176.5128, 171.3389, 163.3848])

YvcmHybr = array([-2.1554, -2.2199, -2.2136, -2.1517, -2.0498, -1.9228, -1.7842, -1.6457, -1.5167, -1.4041, -1.3124, -1.2435, -1.1976, -1.1728, -1.1660, -1.1733, -1.1902, -1.2122, -1.2349, -1.2548, -1.2688, -1.2747, -1.2712, -1.2576, -1.2340, -1.2010, -1.1593, -1.1100, -1.0539, -0.9919, -0.9245, -0.8519, -0.7742, -0.6911, -0.6023, -0.5075, -0.4063, -0.2988, -0.1854, -0.0668, 0.0560, 0.1815, 0.3080, 0.4337, 0.5570, 0.6766, 0.7917, 0.9027, 1.0106, 1.1177, 1.2279, 1.3458, 1.4775, 1.6297, 1.8096, 2.0246, 2.2814, 2.5857, 2.9413, 3.3499, 3.8102, 4.3178, 4.8647, 5.4393, 6.0266, 6.6084, 7.1643, 7.6721, 8.1091, 8.4534, 8.6850, 8.7874, 8.7490, 8.5643, 8.2351])

YavcmAdd = array([2.1909, 2.4450, 2.5634, 2.5596, 2.4487, 2.2454, 1.9625, 1.6105, 1.1982, 0.7370, 0.2493, -0.2257, -0.6377, -0.9493, -1.1508, -1.2496, -1.2584, -1.1937, -1.0748, -0.9208, -0.7484, -0.5722, -0.4063, -0.2620, -0.1460, -0.0598, -0.0012, 0.0347, 0.0533, 0.0608, 0.0631, 0.0653, 0.0719, 0.0859, 0.1091, 0.1415, 0.1820, 0.2273, 0.2731, 0.3134, 0.3420, 0.3526, 0.3400, 0.3002, 0.2316, 0.1352, 0.0142, -0.1248, -0.2730, -0.4189, -0.5494, -0.6500, -0.7056, -0.7019, -0.6259, -0.4668, -0.2175, 0.1250, 0.5591, 1.0777, 1.6681, 2.3124, 2.9876, 3.6663, 4.3180, 4.9100, 5.4091, 5.7831, 6.0029, 6.0435, 5.8865, 5.5210, 4.9447, 4.1655, 3.2012])

YavcmMult = array([0.0138, -0.0296, -0.0894, -0.1617, -0.2425, -0.3274, -0.4123, -0.4935, -0.5688, -0.6386, -0.7081, -0.7884, -0.8933, -1.0263, -1.1618, -1.2498, -1.2584, -1.1937, -1.0739, -0.9258, -0.7727, -0.6067, -0.4082, -0.1793, 0.0550, 0.2662, 0.4360, 0.5578, 0.6332, 0.6679, 0.6687, 0.6423, 0.5947, 0.5315, 0.4579, 0.3791, 0.3006, 0.2273, 0.1632, 0.1104, 0.0693, 0.0390, 0.0180, 0.0047, -0.0025, -0.0050, -0.0039, -0.0001, 0.0057, 0.0130, 0.0214, 0.0307, 0.0412, 0.0528, 0.0661, 0.0815, 0.0996, 0.1208, 0.1458, 0.1749, 0.2084, 0.2463, 0.2882, 0.3337, 0.3818, 0.4312, 0.4804, 0.5276, 0.5709, 0.6082, 0.6376, 0.6572, 0.6657, 0.6620, 0.6459])

YavcmHybr = array([5.0067, 5.2260, 5.1782, 4.9037, 4.4452, 3.8458, 3.1494, 2.4030, 1.6548, 0.9495, 0.3205, -0.2122, -0.6371, -0.9493, -1.1508, -1.2496, -1.2584, -1.1937, -1.0741, -0.9183, -0.7446, -0.5699, -0.4085, -0.2705, -0.1612, -0.0813, -0.0283, 0.0019, 0.0147, 0.0156, 0.0101, 0.0036, 0.0012, 0.0081, 0.0294, 0.0702, 0.1350, 0.2273, 0.3481, 0.4954, 0.6643, 0.8481, 1.0394, 1.2309, 1.4169, 1.5933, 1.7584, 1.9135, 2.0633, 2.2154, 2.3814, 2.5754, 2.8144, 3.1168, 3.5020, 3.9885, 4.5926, 5.3274, 6.2004, 7.2130, 8.3586, 9.6222, 10.9796, 12.3980, 13.8358, 15.2444, 16.5698, 17.7547, 18.7418, 19.4762, 19.9096, 20.0032, 19.7313, 19.0843, 18.0712])

YgvfmAdd = array([4.2449, 4.3171, 4.2575, 4.0839, 3.8171, 3.4796, 3.0944, 2.6840, 2.2689, 1.8671, 1.4935, 1.1592, 0.8716, 0.6344, 0.4479, 0.3094, 0.2137, 0.1540, 0.1224, 0.1108, 0.1113, 0.1169, 0.1222, 0.1230, 0.1172, 0.1043, 0.0853, 0.0625, 0.0391, 0.0185, 0.0045, 0.0001, 0.0077, 0.0286, 0.0630, 0.1094, 0.1654, 0.2273, 0.2906, 0.3501, 0.4007, 0.4375, 0.4564, 0.4548, 0.4319, 0.3890, 0.3299, 0.2609, 0.1909, 0.1309, 0.0937, 0.0934, 0.1443, 0.2603, 0.4537, 0.7346, 1.1097, 1.5814, 2.1473, 2.7998, 3.5258, 4.3069, 5.1194, 5.9358, 6.7249, 7.4538, 8.0889, 8.5979, 8.9512, 9.1238, 9.0972, 8.8602, 8.4107, 7.7565, 6.9154])

YgvfmMult = array([4.3555, 4.7211, 4.7690, 4.5649, 4.1778, 3.6757, 3.1209, 2.5675, 2.0587, 1.6257, 1.2869, 1.0492, 0.9087, 0.8534, 0.8654, 0.9235, 1.0058, 1.0919, 1.1642, 1.2098, 1.2205, 1.1929, 1.1284, 1.0315, 0.9098, 0.7722, 0.6281, 0.4868, 0.3564, 0.2439, 0.1546, 0.0920, 0.0581, 0.0525, 0.0729, 0.1143, 0.1691, 0.2273, 0.2768, 0.3045, 0.2978, 0.2457, 0.1399, -0.0247, -0.2494, -0.5316, -0.8646, -1.2362, -1.6284, -2.0178, -2.3766, -2.6750, -2.8834, -2.9739, -2.9206, -2.7002, -2.2921, -1.6822, -0.8664, 0.1437, 1.3171, 2.6030, 3.9337, 5.2313, 6.4173, 7.4217, 8.1912, 8.6945, 8.9237, 8.8923, 8.6310, 8.1820, 7.5924, 6.9094, 6.1762])

YgvfmHybr = array([4.2767, 4.4927, 4.4889, 4.3053, 3.9850, 3.5717, 3.1069, 2.6284, 2.1676, 1.7494, 1.3910, 1.1021, 0.8857, 0.7385, 0.6527, 0.6169, 0.6180, 0.6423, 0.6767, 0.7099, 0.7331, 0.7398, 0.7268, 0.6934, 0.6413, 0.5740, 0.4965, 0.4144, 0.3336, 0.2596, 0.1976, 0.1512, 0.1233, 0.1147, 0.1248, 0.1506, 0.1872, 0.2273, 0.2618, 0.2796, 0.2691, 0.2187, 0.1182, -0.0398, -0.2588, -0.5373, -0.8681, -1.2382, -1.6290, -2.0170, -2.3749, -2.6735, -2.8828, -2.9739, -2.9202, -2.6992, -2.2938, -1.6947, -0.9037, 0.0647, 1.1805, 2.3998, 3.6664, 4.9170, 6.0872, 7.1173, 7.9582, 8.5752, 8.9494, 9.0781, 8.9722, 8.6540, 8.1537, 7.5061, 6.7483])


fig1 = plt.figure(1)
fig2 = plt.figure(2)
fig3 = plt.figure(3)
ax1 = fig1.add_subplot(111)
ax2 = fig2.add_subplot(111)
ax3 = fig3.add_subplot(111)
ax1.hold(True)
ax2.hold(True)
ax3.hold(True)
ax1.plot(X,Yhigh,'r-',linewidth=1.5)
ax2.plot(X,Yhigh,'r-',linewidth=1.5)
ax3.plot(X,Yhigh,'r-',linewidth=1.5)
ax1.plot(X,Ylow,'b-',linewidth=1.5)
ax2.plot(X,Ylow,'b-',linewidth=1.5)
ax3.plot(X,Ylow,'b-',linewidth=1.5)

ax1.plot(X,YvcmAdd,'k--')
ax1.plot(X,YvcmMult,'k.')
ax1.plot(X,YvcmHybr,'k-')
ax2.plot(X,YavcmAdd,'k--')
ax2.plot(X,YavcmMult,'k.')
ax2.plot(X,YavcmHybr,'k-')
ax3.plot(X,YgvfmAdd,'k--')
ax3.plot(X,YgvfmMult,'k.')
ax3.plot(X,YgvfmHybr,'k-')
ax1.legend(['High fidelity','Low fidelity','Scaled Additive','Scaled Multiplicative','Scaled Hybrid'],'upper left')
ax2.legend(['High fidelity','Low fidelity','Scaled Additive','Scaled Multiplicative','Scaled Hybrid'],'upper left')
ax3.legend(['High fidelity','Low fidelity','Scaled Additive','Scaled Multiplicative','Scaled Hybrid'],'upper left')
ax1.set_title('VCM')
ax2.set_title('AVCM')
ax3.set_title('GVFM')
ax1.axis([-0.05,1.05,-10,20])
ax2.axis([-0.05,1.05,-10,20])
ax3.axis([-0.05,1.05,-10,20])

plt.show()YgvfmHybr = array([4.2767, 4.4927, 4.4889, 4.3053, 3.9850, 3.5717, 3.1069, 2.6284, 2.1676, 1.7494, 1.3910, 1.1021, 0.8857, 0.7385, 0.6527, 0.6169, 0.6180, 0.6423, 0.6767, 0.7099, 0.7331, 0.7398, 0.7268, 0.6934, 0.6413, 0.5740, 0.4965, 0.4144, 0.3336, 0.2596, 0.1976, 0.1512, 0.1233, 0.1147, 0.1248, 0.1506, 0.1872, 0.2273, 0.2618, 0.2796, 0.2691, 0.2187, 0.1182, -0.0398, -0.2588, -0.5373, -0.8681, -1.2382, -1.6290, -2.0170, -2.3749, -2.6735, -2.8828, -2.9739, -2.9202, -2.6992, -2.2938, -1.6947, -0.9037, 0.0647, 1.1805, 2.3998, 3.6664, 4.9170, 6.0872, 7.1173, 7.9582, 8.5752, 8.9494, 9.0781, 8.9722, 8.6540, 8.1537, 7.5061, 6.7483])

YgvfmHybr = array([4.2767, 4.4927, 4.4889, 4.3053, 3.9850, 3.5717, 3.1069, 2.6284, 2.1676, 1.7494, 1.3910, 1.1021, 0.8857, 0.7385, 0.6527, 0.6169, 0.6180, 0.6423, 0.6767, 0.7099, 0.7331, 0.7398, 0.7268, 0.6934, 0.6413, 0.5740, 0.4965, 0.4144, 0.3336, 0.2596, 0.1976, 0.1512, 0.1233, 0.1147, 0.1248, 0.1506, 0.1872, 0.2273, 0.2618, 0.2796, 0.2691, 0.2187, 0.1182, -0.0398, -0.2588, -0.5373, -0.8681, -1.2382, -1.6290, -2.0170, -2.3749, -2.6735, -2.8828, -2.9739, -2.9202, -2.6992, -2.2938, -1.6947, -0.9037, 0.0647, 1.1805, 2.3998, 3.6664, 4.9170, 6.0872, 7.1173, 7.9582, 8.5752, 8.9494, 9.0781, 8.9722, 8.6540, 8.1537, 7.5061, 6.7483])

